package com.dongnam.quanly.mbean;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.dongnam.quanly.mbean.LRDConsoleAppMBean;
import com.dongnam.quanly.web.system.AppConfig;

public class LRDConsoleApp implements LRDConsoleAppMBean {
	private static final Logger logger = LoggerFactory.getLogger(LRDConsoleApp.class);

	@Override
	public void reloadAppConfig() {
		logger.info("reloadAppConfig() invoked");
		try {
			AppConfig.loadAppConfig();
		} catch (Exception e) {
			logger.error("Failed to reload app config.", e);
		}
	}

	@Override
	public void reloadLoggerConfig() {
		logger.info("reloadLoggerConfig() invoked");
		try {
			AppConfig.loadLogConfig();
		} catch (Exception e) {
			logger.error("Failed to reload logger config.", e);
		}
	}

	@Override
	public void reloadByWeb() {
		// TODO Auto-generated method stub

	}

}